﻿using GalaSoft.MvvmLight.Messaging;
using System.Windows;
using WPRD.Models;

namespace WPRD.Views
{
    /// <summary>
    /// EditRadarSiteView.xaml 的交互逻辑
    /// </summary>
    public partial class EditRadarSiteView : Window
    {
        public EditRadarSiteView()
        {
            InitializeComponent();

            //注册MVVMLight消息
            Messenger.Default.Register<object>(this, "CloseEditRadarSiteView", CloseView);

            //当前元素移除时卸载MVVMLight消息
            this.Unloaded += (sender, e) => Messenger.Default.Unregister(this);
        }

        /// <summary>
        /// 关闭视图
        /// </summary>
        /// <param name="obj"></param>
        private void CloseView(object obj)
        {
            this.Close();
        }
    }
}
